On the Solution of the Towers of Hanoi Problem

نویسندگان

  • Hayedeh Ahrabian
  • Abbass Nowzari-Dalini
چکیده

In this paper, two versions of an iterative loopless algorithm for the classical towers of Hanoi problem with O(1) storage complexity and O(2) time complexity are presented. Based on this algorithm the number of different moves in each of pegs with its direction is formulated. Keywords—Loopless algorithm, Binary tree, Towers of Hanoi.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

On the Towers of Hanoi problem

We analyze a solution to a variant of the Towers of Hanoi problem, in which multiple spare pegs are used to move the disks from the source to the destination peg. We also discuss the interesting relation between the number of disks and the total number of disk moves when the number of spare pegs is a function of number of disks.

متن کامل

Hamiltonianicity of the Towers of Hanoi Problem

In this paper we analyze a variant of the n-disk Towers of Hanoi problem with an arbitrary starting and ending configuration using transition graphs representing valid configurations. In particular, we show that starting with any configuration, there is a sequence of moves that goes through each valid configuration exactly once and back to the starting configuration. Also, we show how the origi...

متن کامل

Recent Progress in Heuristic Search: A Case Study of the Four-Peg Towers of Hanoi Problem

We integrate a number of new and recent advances in heuristic search, and apply them to the fourpeg Towers of Hanoi problem. These include frontier search, disk-based search, parallel processing, multiple, compressed, disjoint, and additive pattern database heuristics, and breadth-first heuristic search. New ideas include pattern database heuristics based on multiple goal states, a method to re...

متن کامل

Twin Towers of Hanoi

In the Twin Towers of Hanoi version of the well known Towers of Hanoi Problem there are two coupled sets of pegs. In each move, one chooses a pair of pegs in one of the sets and performs the only possible legal transfer of a disk between the chosen pegs (the smallest disk from one of the pegs is moved to the other peg), but also, simultaneously, between the corresponding pair of pegs in the cou...

متن کامل

Generalizations of the Hanoi Towers Problem

Our theme bases on the classical Hanoi Towers Problem. In this paper we will define a new problem, permitting some positions, that were not legal in the classical problem. Our goal is to find an optimal (shortest possible) sequence of discs' moves. Besides that, we will research all versions of 3-pegs classical problem with some special constraints, when some types of moves are disallowed.

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2012